#include <iostream>
#include <cmath>
using namespace std;
class Circle{
protected:
    const double PI=3.1415926;
    double r;
public:
    Circle(double r){
        this->r=r;
    }
    ~Circle(){}
    double getArea(){
        return PI*r*r;
    }
    double getPerimeter(){
        return 2*PI*r;
    }
};

class CircularCone:public Circle{
    double h;
public:
    CircularCone(double r,double h):Circle(r){
        this->h=h;
    }
    ~CircularCone(){}
    double getVolume(){
        return PI*r*r*h/3;
    }
    double getSurfaceArea(){
        return PI*r*sqrt(r*r+h*h)+PI*r*r;
    }
};

class Cylinder:public Circle{
    double h;
    public:
    Cylinder(double r,double h):Circle(r){
        this->h=h;
    }
    ~Cylinder(){}
    double getVolume(){
        return PI*r*r*h;
    }
    double getSurfaceArea(){
        return 2*PI*r*h+2*PI*r*r;
    }
};

int main(){
    double r=4,h=5;
    Circle circle(r);
    CircularCone circularCone(r,h);
    Cylinder cylinder(r,h);
    cout<<"圆的面积: "<<circle.getArea()<<endl;
    cout<<"圆的周长: "<<circle.getPerimeter()<<endl;

    cout<<"圆锥体积: "<<circularCone.getVolume()<<endl;
    cout<<"圆锥表面积: "<<circularCone.getSurfaceArea()<<endl;

    cout<<"圆柱体积: "<<cylinder.getVolume()<<endl;
    cout<<"圆柱表面积: "<<cylinder.getSurfaceArea()<<endl;
    return 0;
}